<template>
<div class="row">
  <div class="card" v-for="user in users" :key="user.login">
    <a :href="user.html_url" target="_blank">
      <img :src="user.avatar_url" style="width: 100px">
    </a>
    <p class="card-text">{{user.login}}</p>
  </div>

</div>
</template>

<script>

export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "List",
  data(){
    return {
      users:[]
    }
  },
  mounted() {
    this.$bus.$on('getUsers',(users)=>{
      console.log("我是List组件，收到数据：",users)
    this.users=users
    })
  },
}
</script>

<style scoped>

</style>